package com.itheima.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @version 1.0
 * @description 频道实体类
 * @package com.itheima.admin.pojo
 */
@Data
@TableName("ad_channel")
@ApiModel(description = "频道实体")
public class AdChannel {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(notes = "主键id",dataType = "Integer")
    private Integer id;

    @TableField("name")
    @ApiModelProperty(notes = "名称",dataType = "String")
    // 校验规则, min最小长度，max最大的长度，message：规则校验没通过的提示信息
    @Size(min = 2,max = 10,message = "频道的名称长度必须是在2到10位之间")
    private String name;

    @TableField("description")
    @ApiModelProperty(notes = "描述内容",dataType = "String")
    private String description;

    @TableField("is_default")
    @ApiModelProperty(notes = "是否为默认",dataType = "Boolean")
    private Boolean isDefault;

    @TableField("status")
    @ApiModelProperty(notes = "是否启用",dataType = "Boolean")
    private Boolean status;

    @TableField("ord")
    @ApiModelProperty(notes = "排序",dataType = "Integer")
    private Integer ord;

    @TableField("created_time")
    @ApiModelProperty(notes = "创建时间",dataType = "Date")
    private Date createdTime;
}
